package com.task.www.servlet;

import com.task.www.util.format;

import java.util.Scanner;

public class RegisterNext {
    public static String getaccout(){
        System.out.println("接下来请输入你的账号");
        System.out.println("账号（六位数的阿拉伯数字）：");
        Scanner sc = new Scanner(System.in);
        String accout = sc.next();
        while(!format.accout(accout)) {
            System.out.println("请输入正确形式的账号");
            accout = sc.next();
        }
        return accout;
    }

    public static String getpassword(){
        System.out.println("请输入你的密码");
        System.out.println("密码（不可包含特殊字符）；");
        Scanner sc = new Scanner(System.in);
        String password = sc.next();
        while(!format.password(password)) {
            System.out.println("请输入正确形式的密码");
            password = sc.next();
        }
        return password;
    }
}
